/**
 * @Time : 2022/11/22 13:18
 * @Author : Crabin
 * @File : SyncTgInfoController.class
 **/
package com.example.demo.controller;

import com.example.demo.service.DaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/info")
public class SyncTgInfoController {
    //注入service
    @Autowired
    private DaService daServiceImpl;

    @RequestMapping(path = "/getAll", method = RequestMethod.GET)
    @ResponseBody
    public List<Map<String, Object>> getAll() {
        return daServiceImpl.queryAll();
    }
}
